<template>
	<view class="bg">
		<view class="info">
			<view class="info_title">{{info.title}}</view>
			<!-- <view class="info_content" v-html="info.content"></view> -->
			<view class="u-content">
				<u-parse :content="info.content"></u-parse>
			</view>
			<view class="info_date">{{info.createTime}}</view>
		</view>
		<view class="tip">已显示全部</view>
	</view>
</template>

<script>
	import {
		formatDateTime
	} from '@/common/date.js';
	import {
		getNotice
	} from '@/api/notice.js'
	export default {
		data() {
			return {
				info: {}
			}
		},
		onLoad: function(option) {
			console.log(option)
			this.getNoticeInfo(option.id)
		},
		methods: {
			async getNoticeInfo(id) {
				uni.showLoading({
					title: '请稍等...'
				})
				var res = null;
				try {
					res = await getNotice({
						data: {
							id: id
						}
					});
					this.info = res.data

				} catch (err) {

				} finally {
					uni.hideLoading()
				}
			}
		}
	}
</script>

<style>
	.u-content {
	        padding: 24rpx;
	    }
	.bg {
		background-color: #FAFAFA;
		width: 100%;
	}

	.info {
		background-color: #fff;
	}

	.info_title {
		font-size: 17px;
		font-weight: bold;
		color: #333;
		padding: 17px 0;
		margin: 0 14px;
		border-bottom: 1px solid #e3e4e5;
	}

	.info_content {
		padding: 14px;
		font-size: 15px;
		color: #666;
	}

	.info_date {
		color: #999999;
		font-size: 13px;
		padding: 25px 14px 22px;
	}
</style>